Optimal. Leaf size=46 \[ \frac{b x}{a^2+b^2}-\frac{a \log (a \cos (c+d x)+b \sin (c+d x))}{d \left (a^2+b^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0567776, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3531, 3530} \[ \frac{b x}{a^2+b^2}-\frac{a \log (a \cos (c+d x)+b \sin (c+d x))}{d \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3531
Rule 3530
Rubi steps
\begin{align*} \int \frac{\tan (c+d x)}{a+b \tan (c+d x)} \, dx &=\frac{b x}{a^2+b^2}-\frac{a \int \frac{b-a \tan (c+d x)}{a+b \tan (c+d x)} \, dx}{a^2+b^2}\\ &=\frac{b x}{a^2+b^2}-\frac{a \log (a \cos (c+d x)+b \sin (c+d x))}{\left (a^2+b^2\right ) d}\\ \end{align*}
Mathematica [C] time = 0.102479, size = 66, normalized size = 1.43 \[ \frac{2 (b-i a) (c+d x)-a \log \left ((a \cos (c+d x)+b \sin (c+d x))^2\right )+2 i a \tan ^{-1}(\tan (c+d x))}{2 d \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.016, size = 75, normalized size = 1.6 \begin{align*}{\frac{a\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) }{2\,d \left ({a}^{2}+{b}^{2} \right ) }}+{\frac{b\arctan \left ( \tan \left ( dx+c \right ) \right ) }{d \left ({a}^{2}+{b}^{2} \right ) }}-{\frac{a\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d \left ({a}^{2}+{b}^{2} \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.61052, size = 92, normalized size = 2. \begin{align*} \frac{\frac{2 \,{\left (d x + c\right )} b}{a^{2} + b^{2}} - \frac{2 \, a \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{2} + b^{2}} + \frac{a \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.00702, size = 147, normalized size = 3.2 \begin{align*} \frac{2 \, b d x - a \log \left (\frac{b^{2} \tan \left (d x + c\right )^{2} + 2 \, a b \tan \left (d x + c\right ) + a^{2}}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \,{\left (a^{2} + b^{2}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.44173, size = 255, normalized size = 5.54 \begin{align*} \begin{cases} \tilde{\infty } x & \text{for}\: a = 0 \wedge b = 0 \wedge d = 0 \\- \frac{d x \tan{\left (c + d x \right )}}{- 2 b d \tan{\left (c + d x \right )} + 2 i b d} + \frac{i d x}{- 2 b d \tan{\left (c + d x \right )} + 2 i b d} + \frac{1}{- 2 b d \tan{\left (c + d x \right )} + 2 i b d} & \text{for}\: a = - i b \\\frac{d x \tan{\left (c + d x \right )}}{2 b d \tan{\left (c + d x \right )} + 2 i b d} + \frac{i d x}{2 b d \tan{\left (c + d x \right )} + 2 i b d} - \frac{1}{2 b d \tan{\left (c + d x \right )} + 2 i b d} & \text{for}\: a = i b \\\frac{x \tan{\left (c \right )}}{a + b \tan{\left (c \right )}} & \text{for}\: d = 0 \\\frac{\log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 a d} & \text{for}\: b = 0 \\- \frac{2 a \log{\left (\frac{a}{b} + \tan{\left (c + d x \right )} \right )}}{2 a^{2} d + 2 b^{2} d} + \frac{a \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 a^{2} d + 2 b^{2} d} + \frac{2 b d x}{2 a^{2} d + 2 b^{2} d} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.29642, size = 99, normalized size = 2.15 \begin{align*} -\frac{\frac{2 \, a b \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{2} b + b^{3}} - \frac{2 \,{\left (d x + c\right )} b}{a^{2} + b^{2}} - \frac{a \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]